package com.key.modules.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.key.modules.cache.MybatisCache;
import com.key.modules.entity.SysMenu;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author：朕
 * @Package：com.key.modules.mapper
 * @Project：logistics_system
 * @name：SysMenuMapper
 * @Date：2023/3/23 20:08
 * @Filename：SysMenuMapper
 */
@Repository
@CacheNamespace(implementation = MybatisCache.class, eviction = MybatisCache.class)
public interface SysMenuMapper extends BaseMapper<SysMenu> {

    //根据权限名称查询
    SysMenu findMenuByName(String menuName);

    //根据角色id查询权限
    List<SysMenu> findMenuListByRoleIds(@Param("roleIds") List<Integer> role_ids);

}
